package com.jzlx.module.meta.controller;

import com.jzlx.framework.common.pojo.CommonResult;
import org.anyline.controller.impl.AnylineController;
import org.anyline.metadata.Column;
import org.anyline.metadata.Table;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.security.PermitAll;
import java.util.LinkedHashMap;

/**
 * @description:
 * @author: zhulei
 * @create: 2025-03-10 15:11
 **/

@RestController
@RequestMapping("/meta")
public class MetaDateController extends AnylineController {
    @GetMapping("/list")
    @PermitAll
    public CommonResult<LinkedHashMap<String, Column>> list() {
        //这里的true表示 需要分页
        Table table = service.metadata().table("bpm_form");


        LinkedHashMap<String, Column> columns = table.getColumns();
        return CommonResult.success(columns);
    }

}
